// 这是一个专门生成游客账户的 唯一标志的ID
import {nanoid} from 'nanoid';

export default function addUserId() {
	let tempId = localStorage.getItem('tempId');
	if (tempId) {
		return tempId
	} else {
		tempId = nanoid()
		localStorage.setItem('tempId', tempId)
	}
}